import React from 'react';
import PropTypes from 'prop-types';
import './index.scss';
// 书页的第一页
class StartItem extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
    }
  }
  render() {
    let classN = 'joke-item';
    classN += this.props.loaded ? ' active' : '';
    return (
      <div className={classN} style={{ zIndex: '555' }}>
        <div className="page-end">
          放松一下，你准备好了吗？
        </div>
        {
          this.props.activeIndex !== 0 ? <span className="prev controlIcon" onClick={this.props.handlePrev}>上一页</span> : ''
        }
      </div>
    )
  }
}
export default StartItem;
StartItem.propTypes = {
  loaded: PropTypes.number,
  activeIndex: PropTypes.number,
  handlePrev: PropTypes.func,
}
